package com.qfedu.ss.controller;

import com.qfedu.common.param.StorageTblAdd;
import com.qfedu.common.vo.R;
import com.qfedu.ss.service.StorageTblService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * @program: Seata01
 * @description: 控制层实现常用的外部接口，api接口,类-StorageTblController
 * @author: Feri
 * @create: 2024-11-15 08:29:51
 */
@RestController
@RequestMapping("server/storageTbl")
public class StorageTblController{
    /**
    *注入StorageTbl业务对象*/
    @Resource
    private StorageTblService service;

    /**
    * 新增内容*/

    @PostMapping("save")
    public R save(@RequestBody StorageTblAdd add){
       return service.save(add);
    }

    /**
    * 查询 所有数据*/
    @GetMapping("all")
    public R all(){
       return service.queryAll();
    }

    @GetMapping("querycount")
    public Integer queryCount(String code){
        return service.queryCode(code);
    }
    @GetMapping("updatecount")
    public Integer updateCount(String code,Integer money){
        return service.updateCount(code,money);
    }
}